'use strict';

module.exports = app => {
  const { STRING, INTEGER, DATE, BOOLEAN, TEXT } = app.Sequelize;

  const Experiment = app.model.define('experiment', {
    id: {
      type: INTEGER(10),
      primaryKey: true
    },
    title: STRING(100),
    category: INTEGER(11),
    url: STRING(255),
    imgUrl: STRING(255),
    contents: STRING(64),
    campus: BOOLEAN,
    creater: STRING(20),
    isDel: BOOLEAN,
    isIssue: BOOLEAN,
    keywords: TEXT,
    created: INTEGER(10),
    isFolder: BOOLEAN,
    version: BOOLEAN(2),
    contentVersion: STRING(20),
    description: TEXT,
    updated: INTEGER(10),
    courses: TEXT,
    status: BOOLEAN,
    properties: TEXT,
    parentId: STRING(255),
    pages: TEXT,
    isInFolder: BOOLEAN,
    files: TEXT,
    folderIcon: STRING(255),
    isLogicDeleted: BOOLEAN,
    isOfficial: BOOLEAN,
    vip: BOOLEAN,
    price: INTEGER(10),
    flags: TEXT,
    author: STRING(50),
    actionType: BOOLEAN,
    isNew: BOOLEAN,
    sort: INTEGER(10),
    chenmEquation: TEXT,
    englishTitle: STRING(200),
    dataVersion: INTEGER(11),
    gradePhase: INTEGER(11),
    knowledge_points_sort: INTEGER(11),
    introduction: STRING(255),
    rank: INTEGER(11)
  });

  return Experiment;
};